﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
using System.Runtime.InteropServices;

namespace _047
{
    /// <summary>
    /// 定义泛型类
    /// </summary>
    class GenericClass<T>
    {
        //泛型方法
        public GenericClass(T msg)
        {
            Console.WriteLine(msg);
        }
    }
    internal class Program
    {
        static void Main(string[] args)
        {
            GenericClass<string> str_gen = new GenericClass<string>("C#语言");
            GenericClass<int> int_gen = new GenericClass<int>(12345);
            GenericClass<char> char_gen = new GenericClass<char>('C');
            Console.ReadKey();

        }
    }
}
